home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
elec_eng
/
eepddsk4.lzh
/
LOZD-TUN.ASC
< prev
next >
Wrap
Text File
|
1986-04-16
|
5KB
|
165 lines
10 REM
20 REM LOW-Z DOUBLE-TUNED CIRCUIT DESIGN
30 REM ---------------------------------
40 REM BY KEVIN MCCLANING
50 REM
60 REM THIS PROGRAM IS BASED ON THE ARTICLE "LOW-IMPEDANCE DOUBLE-
70 REM TUNED CIRCUITS" BY ANDRZEJ PRZEDPEISKI, RF DESIGN MAGAZINE,
80 REM MAY/JUNE 1982, PG 24.
90 REM
100 REM
110 CLS:PRINT
120 PRINT" LOW-Z DOUBLE-TUNED CIRCUIT DESIGN"
130 PRINT" ---------------------------------"
140 PRINT
150 PRINT " THIS PROGRAM ALLOWS THE USER TO DESIGN DOUBLE-TUNED CIRCUITS"
160 PRINT "FROM USER-SUPPLIED PARAMETERS. THE CIRCUITS HERE ARE DUAL"
170 PRINT "L-C NETWORKS, CAPACITIVELY COUPLED."
180 REM
190 PI = 3.1415926535#
200 TWOPI = 2*PI
210 REM
220 REM
230 REM
240 REM DEFINE A NEW NETWORK
250 REM
260 REM
270 REM
280 GOSUB 820:PRINT
290 PRINT "DEFINE A NEW NETWORK":PRINT
300 GOSUB 860: REM GET THE CENTER FREQ
310 GOSUB 890: REM GET SOURCE IMPEDENCE
320 GOSUB 920: REM GET LOAD IMPEDENCE
330 GOSUB 950: REM GET INDUCTANCE
340 GOSUB 980: REM GET INDUCTOR Q
350 GOSUB 1010: REM GET CIRCUIT Q
360 GOSUB 1250: REM CALCULATE
370 GOSUB 1040 REM OUTPUT TO SCREEN
380 PRINT "WHAT'LL IT BE:"
390 PRINT " 1 - TWIDDLE WITH A PARAMETER"
400 PRINT " 2 - DESIGN A NEW NETWORK"
410 PRINT " 3 - PRINT"
420 PRINT " 4 - END"
430 INPUT ANS
440 IF ANS = 1 THEN 490
450 IF ANS = 2 THEN GOSUB 180:GOTO 380
460 IF ANS = 3 THEN GOSUB 1450:GOSUB 820:GOTO 380
470 IF ANS = 4 THEN CLS:END
480 BEEP:GOTO 380
490 REM
500 REM
510 REM
520 REM
530 REM TWIDDLE WITH A PARAMETER
540 REM
550 REM
560 REM
570 GOSUB 820
580 PRINT "WHICH PARAMETER WOULD YOU LIKE TO TWIDDLE"
590 PRINT " 1 - CENTER FREQ"
600 PRINT " 2 - SOURCE IMPEDENCE"
610 PRINT " 3 - LOAD IMPEDENCE"
620 PRINT " 4 - INDUCTANCE"
630 PRINT " 5 - INDUCTOR Q"
640 PRINT " 6 - CIRCUIT Q"
650 PRINT " 7 - MAIN MENU"
660 INPUT ANS
670 IF ANS = 1 THEN GOSUB 860:GOSUB 1250:GOSUB 1040:GOTO 580
680 IF ANS = 2 THEN GOSUB 890:GOSUB 1250:GOSUB 1040:GOTO 580
690 IF ANS = 3 THEN GOSUB 920:GOSUB 1250:GOSUB 1040:GOTO 580
700 IF ANS = 4 THEN GOSUB 950:GOSUB 1250:GOSUB 1040:GOTO 580
710 IF ANS = 5 THEN GOSUB 980:GOSUB 1250:GOSUB 1040:GOTO 580
720 IF ANS = 6 THEN GOSUB 1010:GOSUB 1250:GOSUB 1040:GOTO 580
730 IF ANS = 7 THEN GOSUB 820:GOTO 380
740 BEEP:GOTO 580
750 REM
760 REM
770 REM
780 REM SUBROUTINES
790 REM
800 REM
810 REM
820 PRINT "----------------------------":RETURN
830 REM
840 LPRINT "----------------------------":RETURN
850 REM
860 INPUT "ENTER DESIRED CENTER FREQ (MHz)";F0:F0 = F0*1000000!
870 RETURN
880 REM
890 INPUT "ENTER SOURCE IMPEDANCE (OHMS)";RS
900 RETURN
910 REM
920 INPUT "ENTER LOAD IMPEDANCE (OHMS)";R0
930 RETURN
940 REM
950 INPUT "ENTER INDUCTANCE (uH)";L:L = L*.000001
960 RETURN
970 REM
980 INPUT "ENTER TYPICAL INDUCTOR Q";QL:QL = ABS(QL)
990 RETURN
1000 REM
1010 INPUT "ENTER DESIRED CIRCUIT Q";Q0:Q0 = ABS(Q0)
1020 RETURN
1030 REM
1040 GOSUB 820
1050 PRINT "DOUBLE-TUNED CIRCUIT"
1060 PRINT " CENTER FREQ = ";(INT(F0/10000!))/100;" MHz"
1070 PRINT " SOURCE IMPEDENCE = ";RS;" OHMS"
1080 PRINT " LOAD IMPEDENCE = ";R0;" OHMS"
1090 PRINT " INDUCTANCE = ";L*1000000!;" uH"
1100 PRINT " INDUCTOR Q = ";QL
1110 PRINT " CIRCUIT Q = ";Q0
1120 PRINT " XL = ";XL;" L = ";INT(L*1E+08)/100;" uH"
1130 PRINT " X1 = ";X1;" C1 = ";INT(C1*1E+14)/100;" pF"
1140 PRINT " X2 = ";X2;" C2 = ";INT(C2*1E+14)/100;" pF"
1150 PRINT " X3 = ";X3;" C3 = ";INT(C3*1E+14)/100;" pF"
1160 PRINT " X4 = ";X4;" C4 = ";INT(C4*1E+14)/100;" pF"
1170 PRINT " X5 = ";X5;" C5 = ";INT(C5*1E+14)/100;" pF"
1180 GOSUB 820:RETURN
1190 REM
1200 REM
1210 REM
1220 REM MAIN CALCULATION LOOP
1230 REM
1240 REM
1250 XL = TWOPI*F0*L
1260 RL = QL*XL
1270 R8 = Q0*XL
1280 X3 = -R8
1290 RT = RL*Q0*XL/(RL-(Q0*XL))
1300 XT = X3/(Q0-1)
1310 R1 = RT/(1+(RT*RT/(XT*XT)))
1320 X1 = 0-SQR(R1*RS*RS/(RS-R1))
1330 X5 = -SQR(R1*R0*R0/(R0-R1))
1340 X2PLUSX6 = (RT*RT/XT)/(1+(RT*RT/(XT*XT))):X4PLUSX7 = X2PLUSX6
1350 X6 = (RS*RS/X1)/(1+(RS*RS/(X1*X1)))
1360 X2 = X2PLUSX6-X6
1370 X7 = (R0*R0/X5)/(1+(R0*R0/(X5*X5)))
1380 X4 = X4PLUSX7-X7
1390 C1 = -1/(TWOPI*F0*X1)
1400 C2 = -1/(TWOPI*F0*X2)
1410 C3 = -1/(TWOPI*F0*X3)
1420 C4 = -1/(TWOPI*F0*X4)
1430 C5 = -1/(TWOPI*F0*X5)
1440 RETURN
1450 REM
1460 REM
1470 REM
1480 REM
1490 REM
1500 GOSUB 840
1510 LPRINT "DOUBLE-TUNED CIRCUIT"
1520 LPRINT " CENTER FREQ = ";INT(F0/10000!)/100
1530 LPRINT " SOURCE IMPEDENCE = ";RS
1540 LPRINT " LOAD IMPEDENCE = ";R0
1550 LPRINT " INDUCTOR Q = ";QL
1560 LPRINT " CIRCUIT Q = ";Q0
1570 LPRINT " XL = ";XL;" L = ";INT(L*1E+08)/100;" uH"
1580 LPRINT " X1 = ";X1;" C1 = ";INT(C1*1E+14)/100;" pF"
1590 LPRINT " X2 = ";X2;" C2 = ";INT(C2*1E+14)/100;" pF"
1600 LPRINT " X3 = ";X3;" C3 = ";INT(C3*1E+14)/100;" pF"
1610 LPRINT " X4 = ";X4;" C4 = ";INT(C4*1E+14)/100;" pF"
1620 LPRINT " X5 = ";X5;" C5 = ";INT(C5*1E+14)/100;" pF"
1630 GOSUB 840:RETURN
1640 REM